import { RouteObject } from "react-router-dom";
import {withLoadable} from '@/utils/loadable'
const Login=withLoadable(()=>import('@/views/Login'))
const Home=withLoadable(()=>import('@/views/Home'))
const Main=withLoadable(()=>import('@/views/Main'))
const NotFound=withLoadable(()=>import('@/views/NotFound'))
const routes:Array<RouteObject>=[
    {
        path:'/login',
        element:<Login></Login>
    },
    {
        path:'/',
        element:<Home></Home>,
        children:[
            {
                index:true,
                element:<Main/>
            }
        ]
    },
    {
        path:'*',
        element:<NotFound/>
    }
]
export default routes